package interfaceSegregationPrinciple

class Order : IOrderForPortal, IOrderForOtherSys, IOrderForAdmin {

    /**
     * 获取门户实例
     */
    fun getOrderForPortal(): IOrderForPortal {
        return Order()
    }

    /**
     * 获取外部系统实例
     */
    fun getOrderForSys(): IOrderForOtherSys {
        return Order()
    }

    /**
     * 获取管理系统实例
     */
    fun getOrderForAdmin(): IOrderForAdmin {
        return Order()
    }

    override fun insertOrder(order: String) {
        PrintUtil.print("插入订单：${order}")
    }

    override fun getOrder(order: String) {
        PrintUtil.print("获取订单：${order}")
    }

    override fun removeOrder(order: String) {
        PrintUtil.print("删除订单：${order}")
    }

    override fun updateOrder(newOrder: String, oldOrder: String) {
        PrintUtil.print("更新订单：${oldOrder} -> $newOrder")
    }
}